// 防抖
export function debounce(callback, time = 400) {
	let timer = null;
	return function (...args) {
		clearTimeout(timer)
		timer = setTimeout(() => {
			callback.apply(this, args)
		}, time)
	}
}